package com.inmaytide.website.domain.entities.deploy;

import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

@Table(name = "deploy_info")
public class DeployInfo implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    private Long id;

    /**
     * 项目ID
     */
    @NotNull
    @Column(name = "project_id")
    private Long projectId;

    /**
     * 项目名称
     */
    @Column(name = "project_name")
    private String projectName;

    /**
     * 项目路径
     */
    @Column(name = "project_path")
    private String projectPath;

    /**
     * 备份目录
     */
    @Column(name = "backup_path")
    private String backupPath;

    /**
     * 操作人
     */
    @Column(name = "operate_user")
    private Long operateUser;

    /**
     * 操作IP
     */
    @Column(name = "operate_ip")
    private String operateIp;

    /**
     * 操作时间
     */
    @Column(name = "operate_time")
    private String operateTime;

    /**
     * 解压数量
     */
    @Column(name = "unzip_count")
    private Long unzipCount;

    /**
     * 备份数量
     */
    @Column(name = "backup_count")
    private Long backupCount;

    /**
     * 部署数量
     */
    @Column(name = "deploy_count")
    private Long deployCount;

    /**
     * 是否成功
     */
    @Column(name = "success")
    private boolean success;

    /**
     * 备注
     */
    @NotBlank
    @Column(name = "desc")
    private String desc;

    /**
     * 部署时产生的日志
     */
    @Column(name = "log")
    private String log;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectPath() {
        return projectPath;
    }

    public void setProjectPath(String projectPath) {
        this.projectPath = projectPath;
    }

    public Long getOperateUser() {
        return operateUser;
    }

    public void setOperateUser(Long operateUser) {
        this.operateUser = operateUser;
    }

    public String getOperateIp() {
        return operateIp;
    }

    public void setOperateIp(String operateIp) {
        this.operateIp = operateIp;
    }

    public String getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(String operateTime) {
        this.operateTime = operateTime;
    }

    public String getBackupPath() {
        return backupPath;
    }

    public void setBackupPath(String backupPath) {
        this.backupPath = backupPath;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getLog() {
        return log;
    }

    public void setLog(String log) {
        this.log = log;
    }
}